package tedu.api.string;

public class StringAndStringBuilderDemo {
    public static void main(String[] args) {
        /*String s = "a";
        for (int i = 0; i < 10000000; i++) {
            s = s+i;
        }
        System.out.println("执行完毕");*/

        long start = System.currentTimeMillis();
        StringBuilder builder = new StringBuilder("a");
        for (int i = 0; i < 10000000; i++) {
            builder.append(i);
        }
        long end = System.currentTimeMillis();
        System.out.println("执行完毕"+(end-start)+"ms");

    }
}
